<?php

namespace App\Models;

use App\Traits\DateFormat;
use App\Traits\ModelTrait;

class ManagerOauthRelation extends Base
{
    use DateFormat, ModelTrait;

    protected $table = 'manager_oauth_relations';

    protected $fillable = [
        'manager_id',
        'channel',
        'channel_appid',
        'openid',
        'unionid',
        'nickname',
        'avatar',
    ];

    /**
     * 关联 管理员
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function manager()
    {
        return $this->belongsTo(\App\Models\Manager::class);
    }
}
